﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Fcdbas.Platform.Interface
{
    public interface IAuthorizationDao<Func,Right>
    {
        /// <summary>
        /// 增加功能
        /// </summary>
        /// <param name="auth"></param>
        /// <returns></returns>
        bool Add(List<Func> Funcs);
        bool ProcessRoleFuncRight(string RoleID,List<Right> Rights);
        bool ProcessUserFuncRight(string UserID, List<Right> Rights);
        /// <summary>
        /// 取得角色的权限列表
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        List<Right> GetRoleRight(string compCode,string roleId);
        /// <summary>
        /// 取得用户权限列表
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        List<Right> GetUserRight(string compCode,string userID);
        /// <summary>
        /// 取得本地缓存功能列表
        /// </summary>
        /// <param name="appName"></param>
        /// <param name="formName"></param>
        /// <param name="funcName"></param>
        /// <returns></returns>
        Func GetLocalFunc(string appName, string formName, string funcName);

        bool Logon(string compCode, string userID, string password,ref string UserName,ref string RoleId);
    }
}
